import { AxiosRequestConfig } from 'axios'
import { version } from 'src/util/constants'

/*
  拦截器名称：全局设置请求的 token 内容
*/
const setVersion = (config: AxiosRequestConfig) => {
  config.headers = config.headers || {}
  config.headers.version = version
  return config
}

export default setVersion
